<template>
  <z-modal
    :width="800"
    v-bind="modalOption"
    :okText="false"
    @ok="handleOk"
    @cancel="handleCancel"
  >
    <a-spin :spinning="confirmLoading">
      <a-form-model layout="horizontal" labelAlign="right" ref="ruleForm" :label-col="labelCol" :wrapper-col="wrapperCol" :model="form" :rules="validatorRules">
        <a-form-model-item label="目标IP" prop="ipTarget">
          <a-input placeholder="请输入目标IP" v-model.trim="form.ipTarget" :disabled="disableSubmit"/>
        </a-form-model-item>
        <a-form-model-item label="描述" prop="ipDesc">
          <a-input placeholder="请输入描述" v-model.trim="form.ipDesc" :disabled="disableSubmit"/>
        </a-form-model-item>
        <a-form-model-item label="监控环境">
          <a-input placeholder="请输入监控环境" v-model.trim="form.monitorEnv" :disabled="disableSubmit"/>
        </a-form-model-item>
        <a-form-model-item label="监控分组">
          <z-dict-select-tag v-model="form.monitorGroup" :disabled="disableSubmit" dictCode="MI_MONITOR_GROUP"/>
        </a-form-model-item>
      </a-form-model>
    </a-spin>
  </z-modal>
</template>

<script>
import ModalFormMixin from '@/mixins/ModalFormMixin'
import ZDictSelectTag from '@/components/dict/ZDictSelectTag'
export default {
  name: 'NetworkModal',
  mixins: [ModalFormMixin],
  components: {
    ZDictSelectTag
  },
  data() {
    return {
      validatorRules: {
        ipTarget: [
          { required: true, message: '请输入目标IP!' }
        ]
      },
      url: {
        add: '/monitor-network/add',
        edit: '/monitor-network/edit'
      }
    }
  },
  methods: {
    addAfter() {
    }
  }
}
</script>
